#include <stdio.h>
#include <stdlib.h>

#define kMaxSize 1001
typedef int Position; /* 整型下标，表示元素的位置 */
typedef struct StringNode *String;
struct StringNode {
    char data[kMaxSize]; /* 存储字符的数组 */
    int length; /* 字符串长度 */
};

String InitStr() {
    /* 初始化一个空的字符串 */
    String s;

    s = (String)malloc(sizeof(struct StringNode));
    s->length = 0;

    return s;
}

/* 算法4-2：字符串删除操作StrRemove(s, pos, len) */
void StrRemove(String s, Position pos, int len) {
    /* pos从1开始 */
    int n;
    Position i;

    n = s->length;
    if ((pos + len - 1) <= n) {
        for (i = pos + len - 1; i <= n; i++) { /* i=n处理结束符 */
            s->data[i - len] = s->data[i];
        }
        s->length = n - len;
    } else {
        s->data[pos - 1] =
            '\0'; /* 从数组下标pos-1开始的所有字符都删掉 */
        s->length = pos - 1;
    }
}
/* 算法4-2 结束 */

String ReadString() {
    Position i;
    String s;

    s = InitStr(); /* 创建空的字符串 */
    i = 0;
    s->data[i] = getchar();
    while (s->data[i] != '\n') {
        i++;
        s->data[i] = getchar();
    }
    s->data[i] = '\0'; /* 字符串结束符占1位 */
    s->length = i;
    return s;
}

int main(void) {
    Position pos;
    int len;
    String s;

    s = ReadString();
    scanf("%d %d", &pos, &len);
    StrRemove(s, pos, len);
    printf("%s\n", s->data);

    return 0;
}